/*
 * @Author       : NaN 353362604@qq.com
 * @Date         : 2023-01-12 09:35:49
 * @LastEditTime : 2023-06-08 11:23:54
 * @LastEditors  : NaN 353362604@qq.com
 * @FilePath     : \AdminStration\src\Common\Login\PlugInUnit.jsx
 * @Description  :
 */

import { VideoCameraAddOutlined, DashOutlined } from '@ant-design/icons'
import { Dropdown } from 'antd'

export const PlugInUnit = () => {
    const CMTLoad = () => window.open('https://image.ljkjkf.com/CmtClientService.exe')
    const LivePlugIn = () =>
        (window.location.href = 'https://image.ljkjkf.com/intellisiteSystem_TieKe/Common/直播插件.reg')
    const browser = () => {
        window.open(`${window.location.origin}/VersionTips`)
    }

    const items = [
        {
            key: '1',
            label: <div onClick={LivePlugIn}>直播插件 </div>,
            icon: <VideoCameraAddOutlined />,
        },
        {
            key: '2',
            label: <div onClick={CMTLoad}>指挥插件 </div>,
            icon: <VideoCameraAddOutlined />,
        },
        {
            key: '3',
            label: <div onClick={browser}>浏览器下载 </div>,
            icon: <VideoCameraAddOutlined />,
        },
        {
            key: '99',
            label: <div> 其他组件 </div>,
            icon: <DashOutlined />,
        },
    ]

    return (
        <div className="plugInUnit">
            <Dropdown menu={{ items }} trigger={['click']}>
                <div> 运行时所需的必要插件 </div>
            </Dropdown>
        </div>
    )
}
